import { defineStore } from "pinia";
import { reactive,ref } from "vue";
export const useRangData=defineStore('rangeData',()=>{
    const state=ref( [
        {
          id: "1",
          name: "靶场名称1",
          level: "简单",
          category: "SQL注入类",
          fileType: "镜像文件",
          createBy: "1"
        },
        {
          id: "2",
          name: "靶场名称2",
          level: "中等",
          category: "扫描类",
          fileType: "war",
          createBy: "2"
        },
        {
          id: "3",
          name: "靶场名称3",
          level: "困难",
          category: "文件类",
          fileType: "zip",
          createBy: "3"
        }
      ])
      function addData(val:any){
        state.value.push(val)
      }
      return {
        state,addData
      }
})